<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script th:src="@{/js/jquery-3.1.1.min.js}"></script>
</head>
<body>
    <div>
        <input id="url" placeholder="输入完整URL录入文件">
        <button id="inputluru">输入录入</button>
    </div>

    <div id="content">
    </div>

</body>


<script th:inline="javascript">

    $(function () {
        $("#content").html([[${fetchHtml}]]);

        $("#inputluru").click(function () {
            $.ajax({
                type: 'post',
                url: "/admin/ebook/books/fetch?url="+$("#url").val(),
                success: function(data){
                    alert(data.msg);
                    window.location.href = "/admin/ebook/choice";
                },
                error:function(data){
                    alert("出错了！！:"+data.msg);
                }
            });

        })


    })


</script>
</html>